package leetcode_core.test;

import java.net.ServerSocket;
import java.net.Socket;

/**
 * 功能描述
 *
 * @author: 张庭杰
 * @date: 2022年10月15日 15:44
 */
public class EchoServer {
    public static void main(String[] args) throws Exception {
        ServerSocket serverSocket = new ServerSocket(9999);
        boolean flag = true;
        while (flag){
            Socket client = serverSocket.accept();
            new Thread(new EchoHandler(client)).start();
        }
        serverSocket.close();
    }
}
